package com.beta.service;

import com.baomidou.framework.service.ISuperService;
import com.baomidou.mybatisplus.plugins.Page;
import com.beta.dto.user.*;
import com.beta.dto.version.ReceiverUpdateDto;
import com.beta.em.UserType;
import com.beta.entity.Receivers;
import com.beta.entity.Users;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;


/**
 *
 * Users 表数据服务层接口
 *
 */
public interface IUsersService extends ISuperService<Users> {


	/**
	 * 用户注册
	 * @param confirmationCode
	 * @param registerDto
	 * @return
	 */
	Users executeCreateUser(String confirmationCode, UserRegisterDto registerDto);

	/**
	 * 密码重置
	 * @param confirmationCode
	 * @param resetPasswordDto
	 *
	 */
	void executeResetPassword(String confirmationCode, UserResetPasswordDto resetPasswordDto);

	/**
	 * 用户审核
	 * @param applyDTO
	 * @return
	 */
	Users executeApplyUser(UserApplyDto applyDTO);

		/**
	 * user绑定设备ID，用于消息推送
	 * @param userId
	 * @param cid
	 * @param deviceType
	 *
	 */
	void executeBungingUserCid(Integer userId, UserType userType, String cid, String deviceType);

	/**
	 * 解绑用户Cid
	 * @param cid
	 * @return
	 */
	void executeUnBundingCid(String cid);

	/**
	 * 校验用户并返回
	 * @param userId
	 * @return
	 */
	Users getAndValidateUser(Integer userId);

	/**
	 * 获得大B平台手续费
	 * @param dealerUser
	 * @return
	 */
	BigDecimal getDealerPlatformFeeRatio(Users dealerUser);

	void updateIdCardPicture(Integer userId, String idCardPicture);

	void deleteIdCardPicture(Integer userId);

	Page<UsersDto> getUsers(Page<UsersDto> page, UserSearchDto userSearchDto);

	Page<Receivers> getReceiversById(Page<Receivers> page, Integer userId);

	Receivers getReceiverById(Integer receiverId);

	void updateReceiver(ReceiverUpdateDto receiverUpdateDto);

	void createReceiver(ReceiverUpdateDto receiverUpdateDto,Integer userId);

	void deleteReceiver(Integer receiverId);

	UserDetailDto getUserDetailById(Integer userId);

	void executeActiveUser(Integer userId);

	void executeDenyUser(Integer userId);

	Map<Integer, Users> getUsersBatch(List<Integer> userIds);

}